<template>
  <div class="bread-crumb">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
      <div v-if="$route.path !== '/index'">
        <el-breadcrumb-item
          v-for="item in $route.matched"
          :to="{ path: item.path }"
          >{{ item.meta.title }}</el-breadcrumb-item
        >
      </div>
    </el-breadcrumb>
  </div>
</template>

<script setup lang="ts"></script>

<style scoped>
.bread-crumb {
  padding: 0px 20px 10px 20px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 20px;
}
</style>
